package com.strategy;

public class ToyDuck extends Duck{

    @Override
    public void display() {
        System.out.println("~~玩具鸭~~");
    }

    @Override
    public void quack() {
        System.out.println("玩具鸭不能叫");
    }

    @Override
    public void swim() {
        System.out.println("玩具鸭不会游泳");
    }

    // 因为玩具鸭不能飞翔，因此需要重写fly
    @Override
    public void fly() {
        System.out.println("玩具鸭不会飞翔");
    }
}
